package 时间工具;

import java.time.LocalDate;

/**
 * @author chihb
 * @create-time 2024/6/29 21:56
 * @description
 */
public class Local {
    public static void main(String[] args) {
        LocalDate d=LocalDate.now();
        System.out.println(d);
        System.out.println(d.getYear());
        System.out.println(d.getDayOfMonth());
        System.out.println(d.getMonth().getValue());
        System.out.println(d.getDayOfWeek().getValue());

        System.out.println(d.withMonth(7));
        System.out.println(d.withDayOfMonth(16));

        System.out.println(d.plusDays(2));
        System.out.println(d.minusDays(3));
        LocalDate localDate = LocalDate.of(2099, 12, 12);

        //equals  isBefore isAfter
        //localTime和LocalDateTime同理
    }
}
